public class ITWorkers {
    String name;
    int age;
    String technical;
    int serviceYear;
    public ITWorkers(String n,int age,String t,int serviceYear){
        this.name=n;
        this.technical=t;
        this.serviceYear=serviceYear;
        if(age>18){
            this.age=age;
        }else{
            age=18;
        }
        System.out.println("姓名:"+n);
        System.out.println("年龄:"+age);
        System.out.println("技术方向:"+t);

        System.out.println("工作年限:"+serviceYear);
    }
    public void showInfo(String workIn,String duty){
        System.out.println("目前就职于:"+workIn);
        System.out.println("职务是:"+duty);
    }
}
